// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  isp_yuvsc12p_reg_c_union_define.h
// Project line  :  Platform And Key Technologies Development
// Department    :  CAD Development Department
// Author        :  xxx
// Version       :  1.0
// Date          :  2013/3/10
// Description   :  The description of xxx project
// Others        :  Generated automatically by nManager V4.2 
// History       :  xxx 2018/03/19 14:39:14 Create file
// ******************************************************************************

#ifndef __ISP_YUVSC12P_REG_C_UNION_DEFINE_H__
#define __ISP_YUVSC12P_REG_C_UNION_DEFINE_H__

/* Define the union U_IHLEFT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0  : 3  ; /* [31:29] */
        unsigned int    ihleft : 29  ; /* [28:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IHLEFT;

/* Define the union U_IHRIGHT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1   : 3  ; /* [31:29] */
        unsigned int    ihright : 29  ; /* [28:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IHRIGHT;

/* Define the union U_UV_HOFFSET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2      : 28  ; /* [31:4] */
        unsigned int    uv_hoffset : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UV_HOFFSET;

/* Define the union U_IVTOP */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_3 : 3  ; /* [31:29] */
        unsigned int    ivtop : 29  ; /* [28:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IVTOP;

/* Define the union U_IVBOTTOM */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_4    : 3  ; /* [31:29] */
        unsigned int    ivbottom : 29  ; /* [28:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IVBOTTOM;

/* Define the union U_UV_VOFFSET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_5      : 28  ; /* [31:4] */
        unsigned int    uv_voffset : 4  ; /* [3:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UV_VOFFSET;

/* Define the union U_IHINC */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_6 : 12  ; /* [31:20] */
        unsigned int    ihinc : 20  ; /* [19:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IHINC;

/* Define the union U_IVINC */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_7        : 11  ; /* [31:21] */
        unsigned int    halflinemode : 1  ; /* [20] */
        unsigned int    ivinc        : 20  ; /* [19:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IVINC;

/* Define the union U_BYPASS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_8  : 30  ; /* [31:2] */
        unsigned int    bypass : 2  ; /* [1:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_BYPASS;

/* Define the union U_FORMAT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_9              : 23  ; /* [31:9] */
        unsigned int    swapin_uv          : 1  ; /* [8] */
        unsigned int    swapout_uv         : 1  ; /* [7] */
        unsigned int    yuv422_semi_planar : 1  ; /* [6] */
        unsigned int    informat           : 1  ; /* [5] */
        unsigned int    swapin             : 1  ; /* [4] */
        unsigned int    swapout            : 1  ; /* [3] */
        unsigned int    rsv_10             : 1  ; /* [2] */
        unsigned int    outformat          : 2  ; /* [1:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_FORMAT;

/* Define the union U_COEFF_H_Y0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_11   : 5  ; /* [31:27] */
        unsigned int    hcoeff2y : 9  ; /* [26:18] */
        unsigned int    hcoeff1y : 9  ; /* [17:9] */
        unsigned int    hcoeff0y : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_H_Y0;

/* Define the union U_COEFF_H_Y1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_12   : 5  ; /* [31:27] */
        unsigned int    hcoeff5y : 9  ; /* [26:18] */
        unsigned int    hcoeff4y : 9  ; /* [17:9] */
        unsigned int    hcoeff3y : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_H_Y1;

/* Define the union U_COEFF_V_Y0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_13   : 5  ; /* [31:27] */
        unsigned int    vcoeff2y : 9  ; /* [26:18] */
        unsigned int    vcoeff1y : 9  ; /* [17:9] */
        unsigned int    vcoeff0y : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_V_Y0;

/* Define the union U_COEFF_V_Y1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_14   : 5  ; /* [31:27] */
        unsigned int    vcoeff5y : 9  ; /* [26:18] */
        unsigned int    vcoeff4y : 9  ; /* [17:9] */
        unsigned int    vcoeff3y : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_V_Y1;

/* Define the union U_COEFF_H_UV0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_15    : 5  ; /* [31:27] */
        unsigned int    hcoeff2uv : 9  ; /* [26:18] */
        unsigned int    hcoeff1uv : 9  ; /* [17:9] */
        unsigned int    hcoeff0uv : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_H_UV0;

/* Define the union U_COEFF_H_UV1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_16    : 23  ; /* [31:9] */
        unsigned int    hcoeff3uv : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_H_UV1;

/* Define the union U_COEFF_V_UV0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_17    : 5  ; /* [31:27] */
        unsigned int    vcoeff2uv : 9  ; /* [26:18] */
        unsigned int    vcoeff1uv : 9  ; /* [17:9] */
        unsigned int    vcoeff0uv : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_V_UV0;

/* Define the union U_COEFF_V_UV1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_18    : 5  ; /* [31:27] */
        unsigned int    vcoeff5uv : 9  ; /* [26:18] */
        unsigned int    vcoeff4uv : 9  ; /* [17:9] */
        unsigned int    vcoeff3uv : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_COEFF_V_UV1;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_IHLEFT      IHLEFT         ; /* 0 */
    volatile U_IHRIGHT     IHRIGHT        ; /* 4 */
    volatile U_UV_HOFFSET  UV_HOFFSET     ; /* 8 */
    volatile U_IVTOP       IVTOP          ; /* C */
    volatile U_IVBOTTOM    IVBOTTOM       ; /* 10 */
    volatile U_UV_VOFFSET  UV_VOFFSET     ; /* 14 */
    volatile U_IHINC       IHINC          ; /* 18 */
    volatile U_IVINC       IVINC          ; /* 1C */
    volatile U_BYPASS      BYPASS         ; /* 24 */
    volatile U_FORMAT      FORMAT         ; /* 28 */
    volatile U_COEFF_H_Y0  COEFF_H_Y0[8]  ; /* 60 */
    volatile U_COEFF_H_Y1  COEFF_H_Y1[8]  ; /* 80 */
    volatile U_COEFF_V_Y0  COEFF_V_Y0[8]  ; /* A0 */
    volatile U_COEFF_V_Y1  COEFF_V_Y1[8]  ; /* C0 */
    volatile U_COEFF_H_UV0 COEFF_H_UV0[8] ; /* E0 */
    volatile U_COEFF_H_UV1 COEFF_H_UV1[8] ; /* 100 */
    volatile U_COEFF_V_UV0 COEFF_V_UV0[8] ; /* 120 */
    volatile U_COEFF_V_UV1 COEFF_V_UV1[8] ; /* 140 */

} S_isp_yuvsc12p_reg_REGS_TYPE;

/* Declare the struct pointor of the module isp_yuvsc12p_reg */
extern volatile S_isp_yuvsc12p_reg_REGS_TYPE *gopisp_yuvsc12p_regAllReg;

/* Declare the functions that set the member value */
int iSetIHLEFT_ihleft(unsigned int uihleft);
int iSetIHRIGHT_ihright(unsigned int uihright);
int iSetUV_HOFFSET_uv_hoffset(unsigned int uuv_hoffset);
int iSetIVTOP_ivtop(unsigned int uivtop);
int iSetIVBOTTOM_ivbottom(unsigned int uivbottom);
int iSetUV_VOFFSET_uv_voffset(unsigned int uuv_voffset);
int iSetIHINC_ihinc(unsigned int uihinc);
int iSetIVINC_halflinemode(unsigned int uhalflinemode);
int iSetIVINC_ivinc(unsigned int uivinc);
int iSetBYPASS_bypass(unsigned int ubypass);
int iSetFORMAT_swapin_uv(unsigned int uswapin_uv);
int iSetFORMAT_swapout_uv(unsigned int uswapout_uv);
int iSetFORMAT_yuv422_semi_planar(unsigned int uyuv422_semi_planar);
int iSetFORMAT_informat(unsigned int uinformat);
int iSetFORMAT_swapin(unsigned int uswapin);
int iSetFORMAT_swapout(unsigned int uswapout);
int iSetFORMAT_outformat(unsigned int uoutformat);
int iSetCOEFF_H_Y0_hcoeff2y(unsigned int uhcoeff2y);
int iSetCOEFF_H_Y0_hcoeff1y(unsigned int uhcoeff1y);
int iSetCOEFF_H_Y0_hcoeff0y(unsigned int uhcoeff0y);
int iSetCOEFF_H_Y1_hcoeff5y(unsigned int uhcoeff5y);
int iSetCOEFF_H_Y1_hcoeff4y(unsigned int uhcoeff4y);
int iSetCOEFF_H_Y1_hcoeff3y(unsigned int uhcoeff3y);
int iSetCOEFF_V_Y0_vcoeff2y(unsigned int uvcoeff2y);
int iSetCOEFF_V_Y0_vcoeff1y(unsigned int uvcoeff1y);
int iSetCOEFF_V_Y0_vcoeff0y(unsigned int uvcoeff0y);
int iSetCOEFF_V_Y1_vcoeff5y(unsigned int uvcoeff5y);
int iSetCOEFF_V_Y1_vcoeff4y(unsigned int uvcoeff4y);
int iSetCOEFF_V_Y1_vcoeff3y(unsigned int uvcoeff3y);
int iSetCOEFF_H_UV0_hcoeff2uv(unsigned int uhcoeff2uv);
int iSetCOEFF_H_UV0_hcoeff1uv(unsigned int uhcoeff1uv);
int iSetCOEFF_H_UV0_hcoeff0uv(unsigned int uhcoeff0uv);
int iSetCOEFF_H_UV1_hcoeff3uv(unsigned int uhcoeff3uv);
int iSetCOEFF_V_UV0_vcoeff2uv(unsigned int uvcoeff2uv);
int iSetCOEFF_V_UV0_vcoeff1uv(unsigned int uvcoeff1uv);
int iSetCOEFF_V_UV0_vcoeff0uv(unsigned int uvcoeff0uv);
int iSetCOEFF_V_UV1_vcoeff5uv(unsigned int uvcoeff5uv);
int iSetCOEFF_V_UV1_vcoeff4uv(unsigned int uvcoeff4uv);
int iSetCOEFF_V_UV1_vcoeff3uv(unsigned int uvcoeff3uv);

#endif // __ISP_YUVSC12P_REG_C_UNION_DEFINE_H__
